﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace Keepo.Models
{
    public class DesignTemplate
    {
        public DesignTemplate() { }

        public int DesignTemplateId { get; set; }

        [Required(ErrorMessage="יש להזין שם תבנית")]
        public string Title { get; set; }

        public string Description { get; set; }

        // GUID for filenames
        public String GUID { get; set; }

        [Required(ErrorMessage="יש לבחור קטגוריה")]
        public int TemplateCategoryId { get; set; }
        public virtual TemplateCategory TemplateCategory { get; set; }

        // < Project XML >
        public string URL { get; set; }
        
        // Pages
        public virtual ICollection<TemplatePage> TemplatePages { get; set; }

        public int? UserId { get; set; }
        public virtual User User { get; set; }
        public string CookieGuid { get; set; }

        public bool IsRendered { get; set; }

        // Background Color for rendering the template
        public int BackgroundRgb { get; set; }
        public bool IsHighlighted { get; set; }

        public int? DesignableProductId { get; set; }

        public DateTime ModifiedDate { get; set; }

        public int Views { get; set; }
    }
}